#ifndef _HCC_ERROR_CODE_MID_XCU_H_
#define _HCC_ERROR_CODE_MID_XCU_H_

#include "ofc/ofc_types.h"
#include "hcc/hcc_error_code.h"
#include "hcc/hcc_error_code_mid.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_MID_XCU_ERROR(error_code) (int)HCC_MAKE_MID_WARE_ERROR(kHccMidWareXcu, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_MID_XCU_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_MID_WARE_ERROR(kHccMidWareXcu, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * xcu模块:
 */
enum THccMidXcuErrorCodeEnumTag
{
	kHccMidXcuSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccMidXcuErrorCodeParam	=	HCC_MAKE_MID_XCU_ERROR(0),			///<参数错误
	kHccMidXcuErrorCodeComm	=	HCC_MAKE_MID_XCU_ERROR(1),			///<通讯错误
	kHccMidXcuErrorCodeCallBack	=	HCC_MAKE_MID_XCU_ERROR(2),			///<回调函数未设置
	kHccMidXcuErrorCodeNoExist	=	HCC_MAKE_MID_XCU_ERROR(3),			///<设备不存在
	kHccMidXcuErrorCodeNotSupport	=	HCC_MAKE_MID_XCU_ERROR(4),			///<类型不支持
	kHccMidXcuErrorCodeOutOfRange	=	HCC_MAKE_MID_XCU_ERROR(5),			///<超出范围
	kHccMidXcuErrorCodeOpened	=	HCC_MAKE_MID_XCU_ERROR(6),			///<设备已打开
	kHccMidXcuErrorCodeClosed	=	HCC_MAKE_MID_XCU_ERROR(7),			///<设备已关闭
	kHccMidXcuErrorCodeLastUnFinished	=	HCC_MAKE_MID_XCU_ERROR(8),			///<上一次动作未完成
	kHccMidXcuErrorCodeFail	=	HCC_MAKE_MID_XCU_ERROR(9),			///<操作失败
	kHccMidXcuErrorCodeNotAligned	=	HCC_MAKE_MID_XCU_ERROR(10),			///<边界未对齐
	kHccMidXcuErrorCodeTimeout	=	HCC_MAKE_MID_XCU_ERROR(11),			///<处理超时
	kHccMidXcuErrorCodeNoResoure	=	HCC_MAKE_MID_XCU_ERROR(12),			///<申请不到资源
};
typedef enum THccMidXcuErrorCodeEnumTag THccMidXcuErrorCodeEnum;


typedef Int32 THccMidXcuErrorCodeEnumLine;
#define kHccMidXcuSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccMidXcuErrorCodeParamLine	HCC_MAKE_MID_XCU_ERROR_LINE(0)	///<参数错误
#define kHccMidXcuErrorCodeCommLine	HCC_MAKE_MID_XCU_ERROR_LINE(1)	///<通讯错误
#define kHccMidXcuErrorCodeCallBackLine	HCC_MAKE_MID_XCU_ERROR_LINE(2)	///<回调函数未设置
#define kHccMidXcuErrorCodeNoExistLine	HCC_MAKE_MID_XCU_ERROR_LINE(3)	///<设备不存在
#define kHccMidXcuErrorCodeNotSupportLine	HCC_MAKE_MID_XCU_ERROR_LINE(4)	///<类型不支持
#define kHccMidXcuErrorCodeOutOfRangeLine	HCC_MAKE_MID_XCU_ERROR_LINE(5)	///<超出范围
#define kHccMidXcuErrorCodeOpenedLine	HCC_MAKE_MID_XCU_ERROR_LINE(6)	///<设备已打开
#define kHccMidXcuErrorCodeClosedLine	HCC_MAKE_MID_XCU_ERROR_LINE(7)	///<设备已关闭
#define kHccMidXcuErrorCodeLastUnFinishedLine	HCC_MAKE_MID_XCU_ERROR_LINE(8)	///<上一次动作未完成
#define kHccMidXcuErrorCodeFailLine	HCC_MAKE_MID_XCU_ERROR_LINE(9)	///<操作失败
#define kHccMidXcuErrorCodeNotAlignedLine	HCC_MAKE_MID_XCU_ERROR_LINE(10)	///<边界未对齐
#define kHccMidXcuErrorCodeTimeoutLine	HCC_MAKE_MID_XCU_ERROR_LINE(11)	///<处理超时
#define kHccMidXcuErrorCodeNoResoureLine	HCC_MAKE_MID_XCU_ERROR_LINE(12)	///<申请不到资源

//旧版本适配补丁
#define kHccMidXcuErrorCodeSuccess kHccMidXcuSuccess


#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_MID_XCU_H_
/**
 * @
 */
